#include "../begonia.h"
#include "boss_1_1.h"
#include "../bullet/tempbullet.h"
#include "../base/scene.h"

boss_1_1::boss_1_1():boss(192.0,250.0,20.0,0.0,0.0,&f.head)
    {
    }
boss_1_1::boss_1_1(double tx,double ty,double tr,double tvx,double tvy,bullet *h):boss(tx,ty,tr,tvx,tvy,h)
    {
    }
void boss_1_1::clone(bullet *h)
    {
        new boss_1_1(x,y,r,vx,vy,h);
    }
bool boss_1_1::move()
    {
        if((int)t/60>(int)tlast/60)
        {
            double t0=atan2(f.py-y,f.px-x);
            new bullet(x,y,10.0,cos(t0)*1.5,sin(t0)*1.5,&f.head);
        }
        double tx,ty;
        tx=rand()%(scw+1);
        ty=rand()%(sch+1);
        if(sqr(tx-f.px)+sqr(ty-f.py)>100.0)
        {
            tempbullet *a=new tempbullet(tx,ty,5.0,0.0,0.0,(picn+1)*20.0,&f.head);
            a->c_r=1.0;
            a->c_g=0.0;
            a->c_b=0.0;
        }
        return true;
    }

